import { Request } from './axios-config';
import { RUC_SERVICE } from './constant';

// 添加校外人员采集表
export const AddOutsideUser = async (data) => {
  return await Request({
    method: 'POST',
    url: `${RUC_SERVICE}/api/outsideUserInfo/v1/outsideUserInfo/add`,
    data
  }).then((res) => res);
};

// 修改校外人员采集表
export const EditOutsideUser = async (data) => {
  return await Request({
    method: 'POST',
    url: `${RUC_SERVICE}/api/outsideUserInfo/v1/outsideUserInfo/edit`,
    data
  }).then((res) => res);
};

// 获取校外人员采集表详情
export const GetOutsideUserDetail = async (id) => {
  return await Request({
    method: 'GET',
    url: `${RUC_SERVICE}/api/outsideUserInfo/v1/outsideUserInfo/detail/${id}`
  }).then((res) => res);
};

// 获取校外人员采集表列表
export const getOutsideUserList = async (data) => {
  return await Request({
    method: 'POST',
    url: `${RUC_SERVICE}/api/outsideUserInfo/v1/outsideUserInfo/list`,
    data
  }).then((res) => res);
};

// 删除校外人员采集表
export const DeleteOutsideUser = async (id) => {
  return await Request({
    method: 'POST',
    url: `${RUC_SERVICE}/api/outsideUserInfo/v1/outsideUserInfo/delete/${id}`
  }).then((res) => res);
};


//  获取学生搜索列表

export const GetStudentsList = async (url, keyWord, pageNum, pageSize, params) => {
  return await Request({
    method: 'POST',
    url: `${RUC_SERVICE}${url}`,
    data: {
      keyWord,
      pageNum,
      pageSize,
      ...params
    }
  }).then((res) => res);
};